package com.zhiyou.crowdfunding.controller;


import com.zhiyou.crowdfunding.bean.Projectstype;
import com.zhiyou.crowdfunding.service.ProjectstypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jyf
 * @since 2022-05-27
 */
@Controller
@RequestMapping("/projectstype")
public class ProjectstypeController {

    @Autowired
    private ProjectstypeService projectstypeService;

    /**
     * 查询所有项目类型
     * @return
     */
    @GetMapping("/getAllProjectstype")
    @ResponseBody
    public List<Projectstype> getAllProjectstype(){
        return projectstypeService.getAllProjectstype();
    }
}

